package com.dream.tihai.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author Valley
 * Created by Valley on 2022/9/5
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName(value = "problem_ask")
public class AskEntity {

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    @TableField(value = "title")
    private String title;
    @TableField(value = "answer")
    private String answer;
    @TableField(value = "typeId")
    private Integer typeId;

    @Override
    public String toString() {
        return "{" +
                "\"id\":\"" + id + "\"" +
                ", \"title\":\"" + title +"\"" +
                ", \"answer\":\"" + answer + "\"" +
                "}";
    }
}
